<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<script type="text/javascript" src="<%=path %>/js/plugins/ajaxfileupload.js"></script>
<div class="panel panel-default">
	<div class="panel-heading">
		<h3 class="panel-title">修改个人信息</h3>
	</div>
	<form id="head_image_form" class="form-horizontal m-t" action="javascript:uploadImage('head_image_img','head_image_file','head_image',1)">
		<div class="form-group">
			<label class="col-sm-3 control-label">头像：</label>
			<div class="col-sm-5 row-sm-2">
				<div class="pull-left col-sm-5 row-sm-2">
					<img src="<%=path %>/uncheck/pictures/servlet?id=${user.headImage}" id="head_image_img"  width="120" height="120">
				</div>
				<div class="col-sm-2 row-sm-2">
					<input type="file" name="file" id="head_image_file">
					<button class="btn btn-primary" id="upload_btn">上传</button>
				</div>
			</div>
		</div>
	</form>
	<form id="user_update_form" class="form-horizontal m-t" action="javascript:updateUserInfo()">
		<input type="hidden" id="head_image" name="headImage" value="${user.headImage}">
		<div class="form-group">
			<label class="col-sm-3 control-label">昵称：</label>
			<div class="col-sm-5">
				<input type="text" class="form-control" name="userName" value="${user.userName}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">E-mail：</label>
			<div class="col-sm-5">
				<input type="email" class="form-control" name="email" value="${user.email}" >
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">电话:</label>
			<div class="col-sm-5">
				<input type="text" class="form-control" placeholder="电话" name="phone" value="${user.phone}">
			</div>
		</div>
		<div class="form-group">
			<label class="col-sm-3 control-label">姓名：</label>
			<div class="col-sm-5">
				<input type="text" class="form-control" placeholder="姓名" name="name" value="${user.name}">
			</div>
		</div>
		<div class="form-group">
			<div class="col-sm-8 col-sm-offset-3">
				<button type="submit" class="btn btn-primary" id="user_update_btn">确定</button>
			</div>
		</div>
	</form>
</div>